/*
 * Copyright (c) 2006-2024, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2024-06-18     RT-Thread    first version
 */

#include <rtthread.h>

#define DBG_TAG "main"
#define DBG_LVL DBG_LOG
#include <rtdbg.h>
// #include "lcdfont.h"
#include "lcd.h"
#include "pic.h"

int main(void)
{
    u8 i, j;
    float t = 0;
    LCD_Init(); // LCD初始化
    LCD_Fill(0, 0, LCD_W, LCD_H, WHITE);
    while (1)
    {
        LCD_ShowChinese(80, 0, "中", RED, WHITE, 24, 0);
        LCD_ShowString(0, 40, "LCD_W:", RED, WHITE, 16, 0);
        LCD_ShowIntNum(48, 40, LCD_W, 3, RED, WHITE, 16);
        LCD_ShowString(80, 40, "LCD_H:", RED, WHITE, 16, 0);
        LCD_ShowIntNum(128, 40, LCD_H, 3, RED, WHITE, 16);
        LCD_ShowString(80, 40, "LCD_H:", RED, WHITE, 16, 0);
        LCD_ShowString(0, 70, "Increaseing Nun:", RED, WHITE, 16, 0);
        LCD_ShowFloatNum1(128, 70, t, 4, RED, WHITE, 16);
        t += 0.11;
        for (j = 0; j < 3; j++)
        {
            for (i = 0; i < 6; i++)
            {
                LCD_ShowPicture(40 * i, 120 + j * 40, 40, 40, gImage_1);
            }
        }
    }
}
